package com.t2two.example.projects;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @version 1.0
 * @description: TODO
 * @author: lifei
 * @date: 2023/12/4 11:54
 */
@Data
public class ExpenseTreeNode {
    private Long id;
    private BigDecimal expense;
    private BigDecimal totalAmount; // 保存包括子金额在内的总金额


    private List<ExpenseTreeNode> children;

    public ExpenseTreeNode(BigDecimal totalAmount, BigDecimal expense,Long id) {
        this.totalAmount = totalAmount;
        this.expense = expense;
        this.id = id;
    }

}

